package cn.edu.sgu.www.mhxysy.dto.baoshi;

import cn.edu.sgu.www.mhxysy.consts.CustomMessages;
import cn.edu.sgu.www.mhxysy.consts.RegExps;
import cn.edu.sgu.www.mhxysy.dto.DataTransferObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Data
@ApiModel
public class EquipmentBaoshiDTO implements DataTransferObject {

	/**
	 * 宝石ID
	 */
	@Pattern(regexp = RegExps.BAOSHI_ID, message = "宝石ID" + CustomMessages.ILLEGAL)
	@NotBlank(message = CustomMessages.BAOSHI_ID_NOT_NULL)
	@ApiModelProperty(value = "宝石ID", required = true)
	private String baoshiId;

	/**
	 * 装备ID
	 */
	@Pattern(regexp = RegExps.EQUIPMENT_ID, message = "装备ID" + CustomMessages.ILLEGAL)
	@NotBlank(message = CustomMessages.EQUIPMENT_ID_NOT_NULL)
	@ApiModelProperty(value = "装备ID", required = true)
	private String equipmentId;

	/**
	 * 镶嵌位置
	 * 取值：1、2
	 */
	@Range(min = 1, max = 2, message = "镶嵌位置" + CustomMessages.ILLEGAL)
	@NotNull(message = "镶嵌位置" + CustomMessages.NOT_NULL)
	@ApiModelProperty(value = "镶嵌位置", required = true)
	private Integer location;

	/**
	 * 镶嵌状态
	 * 0-未镶嵌；1-已镶嵌
	 */
	@Range(min = 0, max = 1, message = "镶嵌状态" + CustomMessages.ILLEGAL)
	@NotNull(message = "镶嵌状态" + CustomMessages.NOT_NULL)
	@ApiModelProperty(value = "镶嵌状态", required = true)
	private Integer inlayStatus;
}